<%@ page import="cn.demo.entity.Bill" %><%--
  Created by IntelliJ IDEA.
  User: dj
  Date: 2017/9/9
  Time: 13:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.List" pageEncoding="utf-8" contentType="application/msexcel; charset=utf-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
    response.setHeader("Content-disposition","attachment; filename=Bill.xls");

%>
<html>
    <head>
        <title>Title</title>
        <meta http-equiv="Content-Type" content="application/msexcel;charset=utf-8"/><!-- 防止中文乱码 -->
        <meta http-equiv="pragma" content="no-cache"/>
        <meta http-equiv="cache-control" content="no-cache"/>
        <meta http-equiv="expires" content="0"/>
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
        <meta http-equiv="description" content="This is my page"/>

    </head>
    <body>

        <table border="0px">
            <tr>
                <td>订单编号</td>
                <td>商品名称</td>
                <td>商品数量</td>
                <td>商品单价</td>
                <td>供应商</td>
                <td>订单金额</td>
                <td>是否付款</td>
                <td>创建时间</td>

            </tr>


            <c:forEach var="row" items="${list}">
                <tr>
                    <td><c:out value="${row.billCode}"></c:out> </td>
                    <td><c:out value="${row.productName}"></c:out> </td>
                    <td><c:out value="${row.productCount}"></c:out></td>
                    <td><c:out value="${row.productUnit}"></c:out></td>
                    <td><c:out value="${row.provider.proName}"></c:out> </td>
                    <td><c:out value="${row.totalPrice}"></c:out> </td>
                    <td>
                        <c:if test="${row.isPayment==1}">已付款</c:if>
                        <c:if test="${row.isPayment==2}">未付款</c:if>
                    </td>
                    <td><c:out value="${row.ctratedate}"></c:out> </td>
                </tr>
            </c:forEach>


        </table>

    </body>
</html>
